Optimal. Leaf size=334 \[ \frac {2 a (e+f x) \text {ArcTan}\left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {i a f \text {PolyLog}\left (2,-i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {i a f \text {PolyLog}\left (2,i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}-\frac {b f \text {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 334, normalized size of antiderivative = 1.00, number of steps
used = 19, number of rules used = 8, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5692, 5680,
2221, 2317, 2438, 6874, 4265, 3799} \begin {gather*} \frac {2 a (e+f x) \text {ArcTan}\left (e^{c+d x}\right )}{d \left (a^2+b^2\right )}-\frac {i a f \text {Li}_2\left (-i e^{c+d x}\right )}{d^2 \left (a^2+b^2\right )}+\frac {i a f \text {Li}_2\left (i e^{c+d x}\right )}{d^2 \left (a^2+b^2\right )}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{d^2 \left (a^2+b^2\right )}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{d^2 \left (a^2+b^2\right )}-\frac {b f \text {Li}_2\left (-e^{2 (c+d x)}\right )}{2 d^2 \left (a^2+b^2\right )}+\frac {b (e+f x) \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}+1\right )}{d \left (a^2+b^2\right )}+\frac {b (e+f x) \log \left (\frac {b e^{c+d x}}{\sqrt {a^2+b^2}+a}+1\right )}{d \left (a^2+b^2\right )}-\frac {b (e+f x) \log \left (e^{2 (c+d x)}+1\right )}{d \left (a^2+b^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 3799
Rule 4265
Rule 5680
Rule 5692
Rule 6874
Rubi steps
\begin {align*} \int \frac {(e+f x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx &=\frac {\int (e+f x) \text {sech}(c+d x) (a-b \sinh (c+d x)) \, dx}{a^2+b^2}+\frac {b^2 \int \frac {(e+f x) \cosh (c+d x)}{a+b \sinh (c+d x)} \, dx}{a^2+b^2}\\ &=-\frac {b (e+f x)^2}{2 \left (a^2+b^2\right ) f}+\frac {\int (a (e+f x) \text {sech}(c+d x)-b (e+f x) \tanh (c+d x)) \, dx}{a^2+b^2}+\frac {b^2 \int \frac {e^{c+d x} (e+f x)}{a-\sqrt {a^2+b^2}+b e^{c+d x}} \, dx}{a^2+b^2}+\frac {b^2 \int \frac {e^{c+d x} (e+f x)}{a+\sqrt {a^2+b^2}+b e^{c+d x}} \, dx}{a^2+b^2}\\ &=-\frac {b (e+f x)^2}{2 \left (a^2+b^2\right ) f}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {a \int (e+f x) \text {sech}(c+d x) \, dx}{a^2+b^2}-\frac {b \int (e+f x) \tanh (c+d x) \, dx}{a^2+b^2}-\frac {(b f) \int \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right ) \, dx}{\left (a^2+b^2\right ) d}-\frac {(b f) \int \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right ) \, dx}{\left (a^2+b^2\right ) d}\\ &=\frac {2 a (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {(2 b) \int \frac {e^{2 (c+d x)} (e+f x)}{1+e^{2 (c+d x)}} \, dx}{a^2+b^2}-\frac {(b f) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a-\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}-\frac {(b f) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}-\frac {(i a f) \int \log \left (1-i e^{c+d x}\right ) \, dx}{\left (a^2+b^2\right ) d}+\frac {(i a f) \int \log \left (1+i e^{c+d x}\right ) \, dx}{\left (a^2+b^2\right ) d}\\ &=\frac {2 a (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}-\frac {(i a f) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {(i a f) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {(b f) \int \log \left (1+e^{2 (c+d x)}\right ) \, dx}{\left (a^2+b^2\right ) d}\\ &=\frac {2 a (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {i a f \text {Li}_2\left (-i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {i a f \text {Li}_2\left (i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {(b f) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2}\\ &=\frac {2 a (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}+\frac {b (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d}-\frac {b (e+f x) \log \left (1+e^{2 (c+d x)}\right )}{\left (a^2+b^2\right ) d}-\frac {i a f \text {Li}_2\left (-i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {i a f \text {Li}_2\left (i e^{c+d x}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}+\frac {b f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right ) d^2}-\frac {b f \text {Li}_2\left (-e^{2 (c+d x)}\right )}{2 \left (a^2+b^2\right ) d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.84, size = 439, normalized size = 1.31 \begin {gather*} \frac {2 b c d e-2 b c^2 f+2 b d^2 e x-2 b c d f x+4 a d e \text {ArcTan}(\cosh (c+d x)+\sinh (c+d x))+4 a d f x \text {ArcTan}(\cosh (c+d x)+\sinh (c+d x))+2 b c f \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )+2 b d f x \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )+2 b c f \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )+2 b d f x \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )+2 b d e \log (a+b \sinh (c+d x))-2 b c f \log (a+b \sinh (c+d x))-2 b d e \log (1+\cosh (2 (c+d x))+\sinh (2 (c+d x)))-2 b d f x \log (1+\cosh (2 (c+d x))+\sinh (2 (c+d x)))+2 b f \text {PolyLog}\left (2,\frac {b e^{c+d x}}{-a+\sqrt {a^2+b^2}}\right )+2 b f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )-2 i a f \text {PolyLog}(2,-i (\cosh (c+d x)+\sinh (c+d x)))+2 i a f \text {PolyLog}(2,i (\cosh (c+d x)+\sinh (c+d x)))-b f \text {PolyLog}(2,-\cosh (2 (c+d x))-\sinh (2 (c+d x)))}{2 \left (a^2+b^2\right ) d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 953 vs. \(2 (313 ) = 626\).
time = 2.87, size = 954, normalized size = 2.86
method | result | size |
risch | \(\frac {2 e b \ln \left (b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}-b \right )}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 e b \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {4 e a \arctan \left ({\mathrm e}^{d x +c}\right )}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \dilog \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f b \dilog \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1+i {\mathrm e}^{d x +c}\right ) b x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1+i {\mathrm e}^{d x +c}\right ) b c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) a x}{d \left (2 a^{2}+2 b^{2}\right )}+\frac {2 i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) a c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1-i {\mathrm e}^{d x +c}\right ) b x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \ln \left (1-i {\mathrm e}^{d x +c}\right ) b c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 i f \dilog \left (1+i {\mathrm e}^{d x +c}\right ) a}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \dilog \left (1+i {\mathrm e}^{d x +c}\right ) b}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) a x}{d \left (2 a^{2}+2 b^{2}\right )}-\frac {2 i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) a c}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f \dilog \left (1-i {\mathrm e}^{d x +c}\right ) b}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 i f \dilog \left (1-i {\mathrm e}^{d x +c}\right ) a}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {2 f c b \ln \left (b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}-b \right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}+\frac {2 f c b \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}-\frac {4 f c a \arctan \left ({\mathrm e}^{d x +c}\right )}{d^{2} \left (2 a^{2}+2 b^{2}\right )}\) | \(954\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 632 vs. \(2 (308) = 616\).
time = 0.37, size = 632, normalized size = 1.89 \begin {gather*} \frac {b f {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + b f {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + {\left (i \, a f - b f\right )} {\rm Li}_2\left (i \, \cosh \left (d x + c\right ) + i \, \sinh \left (d x + c\right )\right ) + {\left (-i \, a f - b f\right )} {\rm Li}_2\left (-i \, \cosh \left (d x + c\right ) - i \, \sinh \left (d x + c\right )\right ) - {\left (b c f - b d \cosh \left (1\right ) - b d \sinh \left (1\right )\right )} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) + 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) - {\left (b c f - b d \cosh \left (1\right ) - b d \sinh \left (1\right )\right )} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) - 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) + {\left (b d f x + b c f\right )} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + {\left (b d f x + b c f\right )} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + {\left (-i \, a c f + b c f + i \, a d \cosh \left (1\right ) - b d \cosh \left (1\right ) + i \, a d \sinh \left (1\right ) - b d \sinh \left (1\right )\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + i\right ) + {\left (i \, a c f + b c f - i \, a d \cosh \left (1\right ) - b d \cosh \left (1\right ) - i \, a d \sinh \left (1\right ) - b d \sinh \left (1\right )\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - i\right ) + {\left (-i \, a d f x - b d f x - i \, a c f - b c f\right )} \log \left (i \, \cosh \left (d x + c\right ) + i \, \sinh \left (d x + c\right ) + 1\right ) + {\left (i \, a d f x - b d f x + i \, a c f - b c f\right )} \log \left (-i \, \cosh \left (d x + c\right ) - i \, \sinh \left (d x + c\right ) + 1\right )}{{\left (a^{2} + b^{2}\right )} d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (e + f x\right ) \operatorname {sech}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {e+f\,x}{\mathrm {cosh}\left (c+d\,x\right )\,\left (a+b\,\mathrm {sinh}\left (c+d\,x\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________